<div class="card-header  text-white">
    <div class="input-group col-md-12 col-xl-8">
        <input type="text" class="form-control" id="teacherName" placeholder="输入教师名称">
        <input type="text" class="form-control" id="className" placeholder="输入班级名称">
        <input type="text" class="form-control" id="classroomName" placeholder="输入实验室名称">
        <span class="input-group-btn">
			<button class="btn btn-secondary" type="button" id="searchNameBtn">
				<i class="fa fa-search" aria-hidden="true"></i>
			</button>
		</span>
    </div>
</div>

<div id="mainContainer" class="container" >
    <div id="mainContainerRepleace" class="row">
        <table class="table table-striped">
            <thead>
            <tr>
                <th data-field="labRegistrationId" >ID</th>
                <th data-field="useTime">使用时间</th>
                <th data-field="className">班级</th>
                <th data-field="classroomName">教室</th>
                <th data-field="teacherName">教师</th>
                <th data-field="attendance">出勤率</th>
                <th data-field="situation">设备状况</th>
                <th data-field="operation">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="lr:${labRegistrations}">
                <th th:text="${lr.labRegistrationId}">...</th>
                <td th:text="${#strings.substring(lr.useTime,0,2)}+'月'+${#strings.substring(lr.useTime,2,4)}+'日'+${#strings.substring(lr.useTime,4,8)}+'节'">...</td>
                <td th:text="${lr.classInfo.className}">...</td>
                <td th:text="${lr.classroomInfo.classroomName}">...</td>
                <td th:text="${lr.teacherInfo.teacherName}">...</td>
                <td th:text="${lr.classInfo.classSize}+'/'+${lr.attendance}">...</td>
                <td th:text="${lr.situation==1}? '正常' : '故障'">...</td>
                <td  class="text-center">
                    <button type="button" class="btn btn-info btn-sm" id="labRegistration-edit" data-toggle="modal" data-th-attr="labRegistrationId=${lr.labRegistrationId}"  data-target="#flipFlop" aria-hidden="true">编辑</button>
                </td>
            </tr>
            </tbody>
        </table>
        <div th:replace="~{fragments/page :: page}">...</div>
    </div>
</div>
<!-- The modal -->
<div class="modal fade" id="flipFlop" tabindex="-1" role="dialog"
     aria-labelledby="flipFlop"  aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="labRegistrationTitle"></h4>
                <button type="button" class="close" data-dismiss="modal"
                        aria-label="Close" id="labRegistrationDialogClose">
                    <span aria-hidden="true" >&times;</span>
                </button>
            </div>
            <form id="labRegistrationForm"></form>
        </div>
    </div>
</div>
<script src="../../js/labRegistrations/list.js" th:src="@{/js/labRegistrations/list.js}"></script>
